package seiacpsjava.utilities;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Path;

import org.junit.Test;

public class FileParserTestCase {

	@Test
	public void testGetNumbers() {
		//119,206,699,946,635,109,865,639,6,556
		
		Path path =  FileSystems.getDefault()
				.getPath("C:/comp6411_files/inputfileforTest.txt");
		FileParser parser = new FileParser(path);
		
		try {			
						
			int [] items = parser.getNumbers();
			assertEquals(items[0], 119);
			assertEquals(items[1], 206);
			assertEquals(items[2], 699);
			assertEquals(items[3], 946);
			assertEquals(items[4], 635);
			assertEquals(items[5], 109);
			assertEquals(items[6], 865);
			assertEquals(items[7], 639);
			assertEquals(items[8], 6);
			assertEquals(items[9], 556);
			
		} catch (IOException e) {
			fail(e.getMessage());
		}
		
		
	}

}
